package com.laborer.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.laborer.entity.Task;
import com.laborer.entity.TiantaiStudentNumber;
import com.laborer.entity.User;
import com.laborer.model.params.TiantaiStudentNumberParams;
import com.laborer.model.result.Result;
import com.laborer.model.result.TiantaiStudentNumberResult;
import com.laborer.service.IStudentIdManagementService;
import com.laborer.service.ITaskService;
import com.laborer.service.IUserService;
import com.laborer.utils.LayuiPageFactory;
import com.laborer.utils.LayuiPageInfo;
import com.laborer.utils.TaskStateMap;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;
import java.util.UUID;

/**
 * @Auther: Wangym
 * @Date: 2021/9/19 12:07
 * @Description:
 */
@Controller
@RequestMapping("/studentIdManagement")
@Slf4j
public class StudentIdManagementController {
    private final  String PREFIX = "studentIdManagement";
    @Autowired
    private IStudentIdManagementService iStudentIdManagementService;

    @RequestMapping("")
    public String studentIdManagement(){
        return PREFIX+"/studentIdManagement";
    }


    @RequestMapping("/list")
    @ResponseBody
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pages", value = "页码", required = true, paramType = "path", dataType = "int"),
            @ApiImplicitParam(name = "count", value = "每页记录数", required = true, paramType = "path", dataType = "int")
    })
    public Result list(TiantaiStudentNumberParams tiantaiStudentNumberParams){
        IPage<Map<String, Object>> list = iStudentIdManagementService.findAll(tiantaiStudentNumberParams);
        return LayuiPageFactory.createPageInfo(list);
    }




}
